﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Kaesoft.Hospedaje.Common
{
    public class CambiarClaveViewModel : ViewModelBase
    {
        private VentanaClavesView _ventanaClave;
        private VentanaClavesViewModel _ventanaClaveModelo;

        /// <summary>
        /// View Model de la ventana de cambio de clave
        /// </summary>
        public VentanaClavesViewModel VentanaClaveModelo
        {
            get { return _ventanaClaveModelo; }
            set
            {
                if (_ventanaClaveModelo != value)
                {
                    _ventanaClaveModelo = value;
                    OnPropertyChanged("VentanaClaveModelo");
                }
            }
        }

        /// <summary>
        /// Vista de la ventana de cambio de clave
        /// </summary>
        public VentanaClavesView VentanaClaveVista
        {
            get { return _ventanaClave; }
            set
            {
                if (_ventanaClave != value)
                {
                    _ventanaClave = value;
                    OnPropertyChanged("VentanaClaveVista");
                }
            }
        }

        #region Constructor
        /// <summary>
        /// Metodo Constructor
        /// </summary>
        public CambiarClaveViewModel()
        {
            VentanaClaveVista = new VentanaClavesView();
            VentanaClaveModelo = new VentanaClavesViewModel(); 
            VentanaClaveVista.DataContext = VentanaClaveModelo;
            VentanaClaveModelo.Autenticado = Caching.Instancia.UsuarioSistema;
            VentanaClaveVista.Show();            
        }
        #endregion
    }
}
